//
//  registeredViewController.m
//  豆瓣电影app
//
//  Created by 洛洛大人 on 16/6/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "registeredViewController.h"
#import "LoginViewController.h"
@interface registeredViewController ()

@end

@implementation registeredViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"注册";
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"注册" style:UIBarButtonItemStylePlain target:self action:@selector(rightAction:)];
    
    [self creatView];
}

-(void)rightAction:(UIBarButtonItem *)item{
    LoginViewController *loginVC = [[LoginViewController alloc]init];
    
    [self.navigationController pushViewController:loginVC animated:YES];
    
    [loginVC release];
    
    
}




-(void)creatView{
    UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(50, 80, 100, 50)];
    [self.view addSubview:label1];
    label1.font = [UIFont systemFontOfSize:25.0];
    
    label1.text = @"用户名:";
    
    UILabel *label2 = [[UILabel alloc]initWithFrame:CGRectMake(label1.frame.origin.x, label1.frame.origin.y + 70, 100, 50)];
    label2.font = [UIFont systemFontOfSize:25.0];
    [self.view addSubview:label2];
    label2.text = @"密码:";
    
    UITextField *textfield1 = [[UITextField alloc]initWithFrame:CGRectMake(label1.frame.origin .x + 120, label1.frame.origin.y, 200, 50)];
    [self.view addSubview:textfield1];
    
    textfield1.font = [UIFont systemFontOfSize:25];
    textfield1.placeholder = @"请输入用户名";
    
    textfield1.borderStyle = UITextBorderStyleRoundedRect;
    
    UITextField *textfield2 = [[UITextField alloc]initWithFrame:CGRectMake(label1.frame.origin.x + 120, label1.frame.origin.y + 70, 200, 50)];
    [self.view addSubview:textfield2];
    textfield2.font = [UIFont systemFontOfSize:25];
    textfield2.placeholder = @"请输入密码";
    textfield2.borderStyle = UITextBorderStyleRoundedRect;
    
    
    UILabel *label3 = [[UILabel alloc]initWithFrame:CGRectMake(label1.frame.origin.x, label1.frame.origin.y + 140, 120, 50)];
    [self.view addSubview:label3];
    label3.font = [UIFont systemFontOfSize:25.0];
    
    label3.text = @"确认密码:";
    
    UILabel *label4 = [[UILabel alloc]initWithFrame:CGRectMake(label1.frame.origin.x, label1.frame.origin.y + 210, 100, 50)];
    label4.font = [UIFont systemFontOfSize:25.0];
    [self.view addSubview:label4];
    label4.text = @"邮箱:";
    
    UITextField *textfield3 = [[UITextField alloc]initWithFrame:CGRectMake(label1.frame.origin .x + 120, label1.frame.origin.y + 140, 200, 50)];
    [self.view addSubview:textfield3];
    
    textfield3.font = [UIFont systemFontOfSize:25];
    textfield3.placeholder = @"再次输入密码";
    textfield3.borderStyle = UITextBorderStyleRoundedRect;
    
    UITextField *textfield4 = [[UITextField alloc]initWithFrame:CGRectMake(label1.frame.origin.x + 120, label1.frame.origin.y + 210, 200, 50)];
    [self.view addSubview:textfield4];
    textfield4.font = [UIFont systemFontOfSize:25];
    textfield4.placeholder = @"请输入邮箱";
    textfield4.borderStyle = UITextBorderStyleRoundedRect;

    
    UILabel *label5 = [[UILabel alloc]initWithFrame:CGRectMake(label1.frame.origin.x, label1.frame.origin.y + 280, 120, 50)];
    label5.font = [UIFont systemFontOfSize:25.0];
    [self.view addSubview:label5];
    label5.text = @"联系方式";
    
    UITextField *textfield6 = [[UITextField alloc]initWithFrame:CGRectMake(label1.frame.origin .x + 120, label1.frame.origin.y + 280, 200, 50)];
    [self.view addSubview:textfield6];
    
    textfield6.font = [UIFont systemFontOfSize:25];
    textfield6.placeholder = @"请输入联系方式";
    textfield6.borderStyle = UITextBorderStyleRoundedRect;
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
